<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>管理员界面</title>
    <script src="{{ url_for('static', filename='common/jquery-3.6.0.min.js') }}"></script>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='login/login.css') }}">
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        /*网页背景*/
        body {
            background-image: url(../../static/common/img/bg.jpg);
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-size: 100%;
        }

        .box {
            border-top: 1px rgba(255, 255, 255, 0.4) solid;
            background-color: rgba(255, 255, 255, 0.4);
            border-radius: 30px;
            margin: 50px auto;
            width: 1000px;
            padding: 30px;
        }
        table tr td{
            border: 1px black solid;
        }
        table{
            width: 500px;
        }
    </style>
</head>
<body>
{% include 'login/bar.html' %}
<div class="box">
    <h3>现有账户名单</h3>
    <table>
        <tr>
            <th>身份</th>
            <th>用户名</th>
            <th>密码</th>
            <th>创建时间</th>
        </tr>
        {% for i in data %}
            <tr>
                <td>{{ i[0] }}</td>
                <td>{{ i[1] }}</td>
                <td>{{ i[2] }}</td>
                <td>{{ i[3] }}</td>
            </tr>
        {% endfor %}
    </table>
    <h3>添加新账户</h3>
    <form action="{{ url_for('login.login3') }}" enctype='multipart/form-data' method='POST'>
        <label for="username1">用户名：</label><input type="text" name="username1" id="username1" maxlength="8"
                                                 placeholder="小于等于8个字符" autocomplete="new-complete"/>
        <label for="password1">密码：</label><input type="text" name="password1" id="password1" autocomplete="new-complete"/>
        <label for="user_type">用户</label><input id="user_type" type="radio" checked="checked" name="user_type" value="用户"/>
        <label for="user_type">访客</label><input id="user_type" type="radio" name="user_type" value="只读"/>
        <input type="submit" value="确定"/>
    </form>
    <h3>删除现有账户</h3>
    <form action="{{ url_for('login.login4') }}" enctype='multipart/form-data' method='POST'>
        <label for="username2">用户名：</label><input type="text" name="username2" id="username2" maxlength="8"
                                                 placeholder="小于等于8个字符" autocomplete="new-complete"/>
        <input type="submit" value="确定"/>
    </form>
    <h3>重置管理员账户的账号和密码</h3>
    <form action="{{ url_for('login.login5') }}" enctype='multipart/form-data' method='POST'>
        <label for="username3">用户名：</label><input type="text" name="username3" id="username3" maxlength="8"
                                                 placeholder="小于等于8个字符" autocomplete="new-complete"/>
        <label for="password3">密码：</label><input type="text" name="password3" id="password3" autocomplete="new-complete"/>
        <input type="submit" value="确定"/>
    </form>
</div>
</body>
</html>